﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Data;
using System.Web.UI.WebControls;

public partial class PasswordRecovery : System.Web.UI.Page
{
    BusinessLogic obj_businesslogic = new BusinessLogic();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btngetpass_Click(object sender, EventArgs e)
    {
        DataTable dt = obj_businesslogic.recoverpassword(txtusername.Text.ToString(),ddlSecurityques.Text.ToString(),txtans.Text.ToString());

        if (dt.Rows[0]["ans"].ToString() == txtans.Text.ToString())
        {
            lblpassword.Text = dt.Rows[0]["password"].ToString();

        }
        else
        {
            lblpassword.Text = "Error";
        }
  
 
   
    }
}